import * as _ from "lodash"
import { OrderDispute, OrderDisputeTransaction } from "./dispute"

export class OrderRefund extends OrderDispute {
}

export function assignOrderRefund(refund: OrderRefund) {
  return _.assign(new OrderRefund(), refund, {
    transactions: _.map(refund.transactions, transaction => _.assign(new OrderDisputeTransaction(), transaction)),
  })
}
